<?php
class user_User extends DomainObject
{
	/**
	 * @var The user id in the DB
	 */
	protected $userId;
	
	
	/**
	 * Holds a profile object that indentifies other profile information for a user
	 * 
	 * @var profile_Profile
	 */
	protected $Profile;
	
	/**
	 * @var The email address of the user
	 */
	protected $email;
	
	
	public function __construct()
	{
		
	}

	public function getId()
	{
		return $this->userId;
	}
	
	
	public function setProfile(profile_Profile $profile)
	{
		$this->Profile = $profile;
	}
	
	public function setEmailAddress($email)
	{
		$this->email = $email;
		$this->markDirty();
	}

	/**
	 * will return a default validator if one isn't set already
	 */
	public function getDefaultValidator() 
	{
		if(is_null($this->_Validator)) {
			return new user_validation_Default($this);
		}
		return $this->_Validator;
	}
	
}
?>